@model ShoppingCartSettingsModel

<div class="panel-body">
    <div class="form-group">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="MaximumWishlistItems_OverrideForStore" asp-input="MaximumWishlistItems" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="MaximumWishlistItems" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="MaximumWishlistItems" />
            <span asp-validation-for="MaximumWishlistItems"></span>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="ShowProductImagesOnWishList_OverrideForStore" asp-input="ShowProductImagesOnWishList" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="ShowProductImagesOnWishList" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="ShowProductImagesOnWishList" />
            <span asp-validation-for="ShowProductImagesOnWishList"></span>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="EmailWishlistEnabled_OverrideForStore" asp-input="EmailWishlistEnabled" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="EmailWishlistEnabled" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="EmailWishlistEnabled" />
            <span asp-validation-for="EmailWishlistEnabled"></span>
        </div>
    </div>
    <nop-nested-setting asp-for="EmailWishlistEnabled">
        <div class="form-group" id="pnlAllowAnonymousUsersToEmailWishlist">
            <div class="col-md-3">
                <nop-override-store-checkbox asp-for="AllowAnonymousUsersToEmailWishlist_OverrideForStore" asp-input="AllowAnonymousUsersToEmailWishlist" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                <nop-label asp-for="AllowAnonymousUsersToEmailWishlist" />
            </div>
            <div class="col-md-9">
                <nop-editor asp-for="AllowAnonymousUsersToEmailWishlist" />
                <span asp-validation-for="AllowAnonymousUsersToEmailWishlist"></span>
            </div>
        </div>
    </nop-nested-setting>
    <div class="form-group">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="AllowOutOfStockItemsToBeAddedToWishlist_OverrideForStore" asp-input="AllowOutOfStockItemsToBeAddedToWishlist" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="AllowOutOfStockItemsToBeAddedToWishlist" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="AllowOutOfStockItemsToBeAddedToWishlist" />
            <span asp-validation-for="AllowOutOfStockItemsToBeAddedToWishlist"></span>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="MoveItemsFromWishlistToCart_OverrideForStore" asp-input="MoveItemsFromWishlistToCart" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="MoveItemsFromWishlistToCart" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="MoveItemsFromWishlistToCart" />
            <span asp-validation-for="MoveItemsFromWishlistToCart"></span>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="DisplayWishlistAfterAddingProduct_OverrideForStore" asp-input="DisplayWishlistAfterAddingProduct" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="DisplayWishlistAfterAddingProduct" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="DisplayWishlistAfterAddingProduct" />
            <span asp-validation-for="DisplayWishlistAfterAddingProduct"></span>
        </div>
    </div>
</div>

<script>
    $(document).ready(function () {
        $("#@Html.IdFor(model => model.MiniShoppingCartEnabled)").click(toggleMiniShoppingCartEnabled);
        $("#@Html.IdFor(model => model.EmailWishlistEnabled)").click(toggleEmailWishlistEnabled);

        toggleMiniShoppingCartEnabled();
        toggleEmailWishlistEnabled();
    });

    function toggleMiniShoppingCartEnabled() {
        if ($('#@Html.IdFor(model => model.MiniShoppingCartEnabled)').is(':checked')) {
            $('#pnlMiniShoppingCartProductNumber').show();
            $('#pnlShowProductImagesInMiniShoppingCart').show();
        } else {
            $('#pnlMiniShoppingCartProductNumber').hide();
            $('#pnlShowProductImagesInMiniShoppingCart').hide();
        }
    }

    function toggleEmailWishlistEnabled() {
        if ($('#@Html.IdFor(model => model.EmailWishlistEnabled)').is(':checked')) {
            $('#pnlAllowAnonymousUsersToEmailWishlist').show();
        } else {
            $('#pnlAllowAnonymousUsersToEmailWishlist').hide();
        }
    }
</script>